Repository navigation
Move input admission and Environment input reservations into sessions - #441
Merged
Merged
Conversation
AdmitInputs admits a validated batch for every admission path, and admitInput is no longer exported. GetEnvironmentInputReservation reads in one snapshot through the bound Session transaction, the receipt and reservation loaders lose their forwarding helpers, FindInputReservation loads receipts only for a matching batch, and the pooled expiry calls in execution are bounded. TestTurnInputRetriesAndRestart again checks that admission leaves the stored Session unchanged and that its latest Turn survives a restart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1 (dissolve
store).Input validation, admission, steering, cancel requests and Environment input reservations move out of
storeand intosessions, which owns the pure decisions and procedures, andsessionpg, which loads and applies.sessions.AdmitInputsis now the one batch procedure for:Authority by operation:
SubmitInputs,ReserveEnvironmentInputsessions.ServiceExpireEnvironmentInputsessions.Service, for the Worker and the Dispatcher alike. It is idempotent under the Session lock and bounded by a 5 s timeout.PromoteEnvironmentInput,FailEnvironmentInput,ExpireEnvironmentInputsExecutionOperations(the newInputExecutionfamily)ListTurnInputs,GetEnvironmentInputReservation,ListEnvironmentInputWorksessions.Reader, each in one snapshotDeleted:
SubmitMessage,RequestCancelandCancelEnvironmentInput(the fixture seeder now runs the real use case);store/scheduling.go,store.ErrExecutionAuthorityandcheckExecutionAuthority;Replay receipts, sequence and position assignment, event order, activity tracking, reservation states and expiry, and the error identities that reach the api are unchanged. PostgreSQL tests in
sessionpgcover:Checks run:
go vet ./services/core/...;sessionsandsessionpgin full with the database;-runfor inputs;-runfor the input andsession_initial*tests;tests/fixturesbuild,check-names.py.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.